﻿using Common.Infrastructure;
using System;

namespace StatsData.Data.Entity
{
    /// <summary>
    /// 在制工单-数据来源 计划报表-在制工单明细
    /// </summary>
    public class t_in_process_work : EntityBase 
    {
        /// <summary>
        /// 线体编号
        /// </summary>
        public string line_code { get; set; }

        public string line_name { get; set; }

        public string line_name_en { get; set; }

        public string line_name_th { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        public string work_code { get; set; }

        /// <summary>
        /// 工单发布日期
        /// </summary>
        public DateTime work_publish_time { get; set; }

        /// <summary>
        /// 工单数量
        /// </summary>
        public decimal work_qty { get; set; }

        /// <summary>
        /// 工单产出数量
        /// </summary>
        public decimal work_output_qty { get; set; }

        /// <summary>
        /// 工单差异数据
        /// </summary>
        public decimal work_output_diff_qty { get; set; }

        /// <summary>
        /// 工单发料时间
        /// </summary>
        public DateTime? work_material_send_begin_time { get; set; }

        /// <summary>
        /// 生产订单开始发料时间（SAP生产订单状态变更I0321）
        /// </summary>
        public DateTime? pdt_sap_gmps_time { get; set; }

        /// <summary>
        /// 在制天数 生产开始发料-入库完成
        /// </summary>
        public decimal wip_day_pdt_material { get; set; }

        /// <summary>
        /// 时间
        /// </summary>
        public DateTime curr_date { get; set; }

        /// <summary>
        /// 工单上线时间
        /// </summary>
        public DateTime? work_start_time { get; set; }

        /// <summary>
        /// 排产时间，最近的一次排产时间
        /// </summary>
        public DateTime? work_plan_date { get; set; }
    
        /// <summary>
        /// 工单入库差异数
        /// </summary>
        public decimal work_warehourse_diff_qty { get; set; }

        /// <summary>
        /// 工单入库数
        /// </summary>
        public decimal work_warehourse_qty { get; set; }

        /// <summary>
        /// 在制天数，工单上线时间开始计算
        /// </summary>
        public decimal wip_day_booking { get; set; }

        /// <summary>
        /// 品番
        /// </summary>
        public string customer_product_code { get; set; }

        /// <summary>
        /// 首次报工时间
        /// </summary>
        public DateTime? first_booking_time { get; set; }
    }
}
